package com.handinglian.employee.service;

import com.handinglian.employee.dto.DepartmentDto;
import com.handinglian.employee.dto.DepartmentLevelDto;
import com.handinglian.employee.dto.DepartmentUserNumDto;
import com.handinglian.employee.entity.Department;
import com.handinglian.employee.param.DepartmentCreateParam;
import com.handinglian.employee.param.DepartmentUpdateParam;

import java.util.Collection;
import java.util.List;

public interface DepartmentService {
    int createDepartment(DepartmentCreateParam departmentCreateParam);

    /**
     * 查询被删除的部门
     * @author pxl
     * @param departmentName
     * @return com.handinglian.contentunion.entity.CentralHost
     * @date 2019/6/3 10:49
     */
    Department loadInvalidDepartment(String departmentName);

    /**
     * 恢复删除的部门
     * @author pxl
     * @param departmentName
     * @return int
     * @date 2019/6/3 17:56
     */
    int recoverDepartment(String departmentName);

    int updateDepartment(DepartmentUpdateParam departmentUpdateParam);

    int deleteDepartment(Integer departmentId);

    DepartmentDto loadDepartment(Integer departmentId);

    /**
    * 获取部门列表树
    * @author pxl
    * @param
    * @return java.util.List<com.handinglian.employee.dto.DepartmentDto>
    * @date 2019/8/9 17:24
    */
    List<DepartmentDto> inquireDepartmentList();

    /**
    * 查询该部门及其子部门
    * @author pxl
    * @param
    * @return java.util.List<com.handinglian.employee.entity.Department>
    * @date 2019/10/8 11:04
    */
    List<Department> listSubDepartmentId(Integer departmentId);

    List<DepartmentDto> inquireDepartmentByParentId(List<Integer> parentIds, List<DepartmentUserNumDto> departmentUserNumDtos);

    List<Department> listDepartment(List<Integer> parentIds);

    /**
    * 对部门进行排序
    * @author pxl
    * @param updatedOrderNos
    * @param departmentIds
    * @return int
    * @date 2019/8/9 17:23
    */
    int updateOrderNo(List<Integer> updatedOrderNos, List<Integer> departmentIds);

    /**
    * 查询二级部门
    * @author pxl
    * @param
    * @return java.util.List<com.handinglian.employee.entity.Department>
    * @date 2019/12/23 16:00
    */
    List<Department> listTwoLevelDepartment();

    /**
    * 查询三级部门
    * @author pxl
    * @param
    * @return java.util.List<com.handinglian.employee.entity.Department>
    * @date 2019/12/23 16:00
    */
    List<DepartmentLevelDto> listThreeLevelDepartment();

    List<Department> inquireDepartmentByDepartmentName(Collection<String> departmentNameCollection);

    List<Department> getAll();
}
